
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <script src="/websource/My97DatePicker/WdatePicker.js"></script>
    <script src="/dongyang/dyzftzxm.nsf/jsFun.js"></script>

    <script language="JavaScript" type="text/javascript">
        <!--
        function topclick(obj){
            $('#idf1').hide();
            $('#idf2').hide();
            for (var i = 1; i <= 9; i++){
                $('#id' + i).attr('class','top-select');
            }
            $(obj).attr('class','slect-active top-select');
            if ($(obj).attr('id') == 'id1'){
                $('#idf1').show();
            }else{
                $('#idf2').show();
            }
        }
        function valivalue_submit(){
            var docinfo = '';
            //不是新文档，先判断文档是否修改过，再判断名称有没有改过，修改则判断项目名称是否存在。
            if ($('#idnewdoc').val() != '1'){
                if (checkSaveState() == false){
                    return false;
                }
            }
            return true;
        }
        function checkSaveState(){
            docinfo = docInfoByFormula($('[name=dbpath]').val(),'vw_all_byunid',$('#id_unid').val(),'2');
            docinfo = docinfo.replace(/[\r\n]/g,"");
            if (docinfo != $('#id_lastmodify').val()){
                alert('项目合同信息已经被修改，请刷新后再修改与保存');
                return false;
            }
            return true;
        }
        $(function(){
            // Replace the <textarea id="editor1"> with a CKEditor
            // instance, using default configuration.

        })

        function cacljd(obj,irow){
            if ($('[name=jdorje_sel]').val() == ''){
                alert('请先选择进度类型');
                obj.value = '';
                return false;
            }
            if (irow > 1){
                if ($('[name=jd' + (irow - 1) + ']').val() == ''){
                    alert('请先填写第' + (irow - 1) + '节点的百分比！');
                    obj.value = '';
                    return false;
                }
            }

            if (isNaN(obj.value)){
                alert('请输入数字');
                obj.value = '';
                return false;
            }
            if ($('[name=htjg]').val() == ''){
                alert('请先输入合同价格');
                obj.value = '';
                return false;
            }
            if (obj.value > 100){
                alert('不能输入大于100的数字，请重新输入！');
                obj.value = '';
                return false;
            }
            if (irow > 1){
                if (parseFloat(obj.value,10) < parseFloat($('[name=jd' + (irow - 1) + ']').val(),10)){
                    alert('第' + irow + '节点的百分比不能小于第' + (irow - 1) + '节点的百分比，请重新填写');
                    obj.value = '';
                    return false;
                }
            }

            if (obj.value != '' && $('[name=htjg]').val() != ''){
                var fNum = parseFloat(obj.value * $('[name=htjg]').val() * 0.01);
                $('[name=jdje' + irow + ']').val(fNum.toFixed(2));
            }
            for (var i = irow + 1; i < 7; i++){
                $('[name=jd' + i + ']').attr('readonly',false);
            }

            if(obj.value == 100){
                for (var i = irow + 1; i < 7; i++){
                    $('[name=jd' + i + ']').attr('readonly',true);
                }
            }
        }

        function caclje(obj,irow){
            if ($('[name=jdorje_sel]').val() == ''){
                alert('请先选择进度类型');
                obj.value = '';
                return false;
            }
            if (irow > 1){
                if ($('[name=jdje' + (irow - 1) + ']').val() == ''){
                    alert('请先填写第' + (irow - 1) + '节点的金额！');
                    obj.value = '';
                    return false;
                }
            }

            if (isNaN(obj.value)){
                alert('请输入数字');
                obj.value = '';
                return false;
            }
            if ($('[name=htjg]').val() == ''){
                alert('请先输入合同价格');
                obj.value = '';
                return false;
            }


            if (parseFloat(obj.value,10) > parseFloat($('[name=htjg]').val(),10)){
                alert('金额不能大于合同金额');
                obj.value = '';
                return false;
            }

            if (irow > 1){
                if (parseFloat(obj.value,10) < parseFloat($('[name=jdje' + (irow - 1) + ']').val(),10)){
                    alert('第' + irow + '节点的金额不能小于第' + (irow - 1) + '节点的金额，请重新填写');
                    obj.value = '';
                    return false;
                }
            }

            if (obj.value != '' && $('[name=htjg]').val() != ''){
                var fNum = parseFloat(obj.value,10) / parseFloat($('[name=htjg]').val(),10);
                fNum = fNum * 100;
                $('[name=jd' + irow + ']').val(fNum.toFixed(2));
            }
            for (var i = irow + 1; i < 7; i++){
                $('[name=jdje' + i + ']').attr('readonly',false);
            }

            if(parseFloat($('[name=htjg]').val(),10) == parseFloat(obj.value,10)){
                for (var i = irow + 1; i < 7; i++){
                    $('[name=jdje' + i + ']').attr('readonly',true);
                }
            }
        }
        // -->
    </script>

    <script language="JavaScript" type="text/javascript">
        <!--
        document._domino_target = "_self";
        function _doClick(v, o, t, h) {
            var form = document._xmsb_xmhtxmzc_v1;
            if (form.onsubmit) {
                var retVal = form.onsubmit();
                if (typeof retVal == "boolean" && retVal == false)
                    return false;
            }
            var target = document._domino_target;
            if (o.href != null) {
                if (o.target != null)
                    target = o.target;
            } else {
                if (t != null)
                    target = t;
            }
            form.target = target;
            form.__Click.value = v;
            if (h != null)
                form.action += h;
            form.submit();
            return false;
        }
        // -->
    </script>
</head>
<body text="#000000" bgcolor="#FFFFFF" onload="/*
CKEDITOR.editorConfig = function( config ) {
	config.height = 500;
};
CKEDITOR.on('instanceReady',function(event){
	editor=event.editor;
	editor.execCommand(&quot;toolbarCollapse&quot;);
	editor.setReadOnly(false); //只读:true
})
CKEDITOR.replace('editor1');

$('.textarea').wysihtml5();
*/
if ($('#id_isedit').val() == '1'){
	if ($('[name=jd1]').val() == 100){
		$('[name=jd2]').attr('readonly',true);
		$('[name=jd3]').attr('readonly',true);
	}
	if ($('[name=jd2]').val() == 100){
		$('[name=jd3]').attr('readonly',true);
	}

}">

<form method="post" action="/dongyang/dyzftzxm.nsf/xmsb_xmhtxmzc_v1?OpenForm&amp;Seq=1&amp;xmid=%E5%95%8A%E5%95%8A&amp;menuid=2020810697734808728&amp;xmhtmenuid=&amp;zfwj=&amp;r=0.37070838693424957" enctype="multipart/form-data" name="_xmsb_xmhtxmzc_v1">
    <input type="hidden" name="__Click" value="0"><link rel="stylesheet" href="/dongyang/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="/dongyang/AdminLTE/bower_components/font-awesome/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="/dongyang/AdminLTE/bower_components/Ionicons/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="/dongyang/AdminLTE/dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins      folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="/dongyang/AdminLTE/dist/css/skins/_all-skins.min.css">
    <!-- bootstrap wysihtml5 - text editor -->
    <link rel="stylesheet" href="/dongyang/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="/dongyang/AdminLTE/js/html5shiv.min.js"></script>
    <script src="/dongyang/AdminLTE/js/respond.min.js"></script>
    <![endif]-->
    <!-- Google Font -->
    <link rel="stylesheet" href="/dongyang/AdminLTE/woff2/css.css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic"><span style="display:none;">
权限控制子表单
</span>
    <span id='idFormButton' style='display:none;'><br><br><br>
<input name="form" value="xmsb_xmhtxmzc_v1">
<input name="$V2AttachmentOptions" value="0">
<input name="status" value="">
<input name="$$return" value="&lt;script&gt;self.close()&lt;/script&gt;">
<input name="xmid" value="啊啊">
<input name="menuid" value="2020810697734808728">
<input name="readers" value="admin, 财政管理员, *">
<input name="authors" value="admin, 财政管理员, *">
<input name="readers_user" value="财政管理员, dy_jsdw_2020910561440364003, dy_jsdw_202097732066737270, *">
<input name="authors_user" value="财政管理员, dy_jsdw_2020910561440364003, dy_jsdw_202097732066737270, *">
<input name="creator" value="财政管理员" class="form-control tooltips">
<input name="jdorje_sel" value="">
<input name="dbpath" value="dongyang/dyzftzxm.nsf"> <input id='id_unid' value='BD5B5840845961DC48258648000D546D'>;
<input id='id_docurl' value='/dongyang/dyzftzxm.nsf/0/BD5B5840845961DC48258648000D546D?editdocument'>;
<input id='id_tabid_active' value=''>;
<input id='id_isedit' value='1'>;
<input id='id_attName' value=''>;
<input id='idnewdoc' value='1'>
<input id='id_lastmodify' value='2020-12-24 10:25:35'>;
</span>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="ThemeBucket">
        <link href="/dongyang/css/style.css" rel="stylesheet">
        <link href="/dongyang/css/style-responsive.css" rel="stylesheet">
        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
        <script src="/dongyang/js/html5shiv.js"></script>
        <script src="/dongyang/js/respond.min.js"></script>
        <![endif]-->
    </head>
    <body style="background-color:#ffffff;overflow:auto;">
    <div style="display:n1one;"><span style='display:none;'>
<input type="button" value="保存" id="id_btn_saveedit" class="btn btn-primary" onclick="return _doClick('482585E1000E41E2.e3c415e93b4702ab482585c20020366b/$Body/0.A6', this, null)">
<input type="button" value="保存附件上传" id="id_btn_save_fjtab" class="btn btn-primary" style="display:none;" onclick="return _doClick('482585E1000E41E2.e3c415e93b4702ab482585c20020366b/$Body/0.19E', this, null)">
<input type="button" value="保存老" id="id_btn_saveedit_1" class="btn btn-info" onclick="return _doClick('482585E1000E41E2.e3c415e93b4702ab482585c20020366b/$Body/0.2B2', this, null)">
<input name="docOptAction" value="">                        <br></span>

        <input type="button" onclick="if (!valivalue_submit()){
	return false;
}
$('[name=docOptAction]').val('saveonly')
$('#id_btn_saveedit').click();

" value="保存" class="btn btn-primary">

        <input type="button" onclick="self.close();" value="关闭" class="btn btn-primary">

        <input type="button" onclick="if ($('#idnewdoc').val() != '1'){
	if (checkSaveState() == false){
		return false;
	}
}
$('[name=status]').val('1');
$('[name=docOptAction]').val('saveonly')
$('#id_btn_saveedit').click();" value="提交" id="id_btn_saveedit_1_1" class="btn btn-primary">

        <input type="button" onclick="alert('功能开发中...')" value="申请退回" id="id_btn_back_1" class="btn btn-primary">
    </div>
    <div style="overflow-y:auto;height:100%;"><div align="center">
        <table class="table table-bordered" style="width:80%;" border="0" cellpadding="0" cellspacing="0" border="1">
            <tr valign="top"><td width="138" valign="middle"><div align="center"><b>时间</b></div></td><td width="640" colspan="3">
                <input name="rq" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onclick="WdatePicker()" class="form-control tooltips"></td></tr>

            <tr valign="top"><td width="138" valign="middle"><div align="center"><b>实施单位</b></div></td><td width="640" colspan="3">
                <input name="zbf" value="" class="form-control tooltips"></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>工程合同</b></div></td><td width="640" colspan="3">
                <input name="htmc" value="" class="form-control tooltips"></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>资质</b></div></td><td width="640" colspan="3">
                <input name="zz" value="" class="form-control tooltips"></td></tr>

            <tr valign="top"><td class="tdtitle" width="138" valign="middle"><div align="center"><b>金额</b></div></td><td class="form-inline" width="640" colspan="3">
                <input name="htjg" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom'  onchange="if (isNaN(this.value)){
	alert('合同价格请输入数字');
	this.value = '';
}
if (this.value == ''){
	this.value = '0';
}else{
	var fNum = parseFloat(this.value);
	this.value = fNum.toFixed(2);
}" class="form-control tooltips" style="width:300px;text-align:right;">　<b>元</b></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>进度类型</b></div></td><td width="640" colspan="3">
                <input name="%%Surrogate_jdorje" type="hidden" value="1"><label>
                <input type="radio" name="jdorje" value="进度" onclick="var i = 0;

if(this.value == &quot;进度&quot;){
	for (i = 1; i &lt;= 6; i++){
		$('[name=jd' + i +']').attr('readonly',false);
		$('[name=jdje' + i +']').attr('readonly',true);
	}
}
if(this.value == &quot;金额&quot;){
	for (i = 1; i &lt;= 6; i++){
		$('[name=jd' + i +']').attr('readonly',true);
		$('[name=jdje' + i +']').attr('readonly',false);
	}
}
$('[name=jdorje_sel]').val(this.value);" style="margin-left:10px;">进度</label><label>
                <input type="radio" name="jdorje" value="金额" onclick="var i = 0;

if(this.value == &quot;进度&quot;){
	for (i = 1; i &lt;= 6; i++){
		$('[name=jd' + i +']').attr('readonly',false);
		$('[name=jdje' + i +']').attr('readonly',true);
	}
}
if(this.value == &quot;金额&quot;){
	for (i = 1; i &lt;= 6; i++){
		$('[name=jd' + i +']').attr('readonly',true);
		$('[name=jdje' + i +']').attr('readonly',false);
	}
}
$('[name=jdorje_sel]').val(this.value);" style="margin-left:10px;">金额</label></td></tr>

            <tr valign="top"><td class="tdtitle" width="138" valign="middle"><div align="center"><b>第一节点</b></div></td><td class="form-inline" width="640" colspan="3">
                <input name="jd1" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onchange="/*
if (isNaN(this.value)){
	alert('请输入数字');
	this.value = '';
	return false;
}
if ($('[name=htjg]').val() == ''){
	alert('请先输入合同价格');
	this.value = '';
	return false;
}
if (this.value &gt; 100){
	alert('不能输入大于100的数字，请重新输入！');
	return false;
}
if (this.value != '' &amp;&amp; $('[name=htjg]').val() != ''){
	var fNum = parseFloat(this.value * $('[name=htjg]').val() * 0.01);
	$('[name=jdje1]').val(fNum.toFixed(2));

}
$('[name=jd2]').attr('readonly',false);
$('[name=jd3]').attr('readonly',false);
if(this.value == 100){
	$('[name=jd2]').attr('readonly',true);
	$('[name=jd2]').val('');
	$('[name=jd3]').attr('readonly',true);
	$('[name=jd3]').val('');
}
*/
cacljd(this,1)" class="form-control tooltips">　<b>%，金额：</b>
                <input name="jdje1" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onchange="caclje(this,1)" class="form-control tooltips" style="text-align:right;">　<b>元</b></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>第一节点描述</b></div></td><td width="640" colspan="3">
                <input name="jdms1" value="" class="form-control tooltips"></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>第二节点</b></div></td><td class="form-inline" width="640" colspan="3">
                <input name="jd2" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onchange="cacljd(this,2)" class="form-control tooltips">　<b>%，金额：</b>
                <input name="jdje2" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onchange="caclje(this,2)" class="form-control tooltips" style="text-align:right;">　<b>元</b></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>第二节点描述</b></div></td><td width="640" colspan="3">
                <input name="jdms2" value="" class="form-control tooltips"></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>第三节点</b></div></td><td class="form-inline" width="640" colspan="3">
                <input name="jd3" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onchange="cacljd(this,3)
/*
if ($('[name=jd2]').val() == ''){
	alert('请先填写第二节点的百分比！');
	this.value = '';
	return false;
}
if (isNaN(this.value)){
	alert('请输入数字');
	this.value = '';
	return false;
}
if ($('[name=htjg]').val() == ''){
	alert('请先输入合同价格');
	this.value = '';
	return false;
}
if (this.value &gt; 100){
	alert('不能输入大于100的数字，请重新输入！');
	this.value = '';
	return false;
}
if (parseFloat(this.value,10) &lt; parseFloat($('[name=jd2]').val(),10)){
	alert('第三节点的百分比不能于第二节点的百分比，请重新填写');
	this.value = '';
	return false;
}
if (this.value != '' &amp;&amp; $('[name=htjg]').val() != ''){
	var fNum = parseFloat(this.value * $('[name=htjg]').val() * 0.01);
	$('[name=jdje3]').val(fNum.toFixed(2));
}
*/" class="form-control tooltips">　<b>%，金额：</b>
                <input name="jdje3" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onchange="caclje(this,3)" class="form-control tooltips" style="text-align:right;">　<b>元</b></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>第三节点描述</b></div></td><td width="640" colspan="3">
                <input name="jdms3" value="" class="form-control tooltips"></td></tr>

            <tr valign="top"><td class="tdtitle" width="138" valign="middle"><div align="center"><b>第四节点</b></div></td><td class="form-inline" width="640" colspan="3">
                <input name="jd4" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onchange="cacljd(this,4)" class="form-control tooltips">　<b>%，金额：</b>
                <input name="jdje4" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onchange="caclje(this,4)" class="form-control tooltips" style="text-align:right;">　<b>元</b></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>第四节点描述</b></div></td><td width="640" colspan="3">
                <input name="jdms4" value="" class="form-control tooltips"></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>第五节点</b></div></td><td class="form-inline" width="640" colspan="3">
                <input name="jd5" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onchange="cacljd(this,5)" class="form-control tooltips">　<b>%，金额：</b>
                <input name="jdje5" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onchange="caclje(this,5)" class="form-control tooltips" style="text-align:right;">　<b>元</b></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>第五节点描述</b></div></td><td width="640" colspan="3">
                <input name="jdms5" value="" class="form-control tooltips"></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>第六节点</b></div></td><td class="form-inline" width="640" colspan="3">
                <input name="jd6" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onchange="cacljd(this,6)" class="form-control tooltips">　<b>%，金额：</b>
                <input name="jdje6" value="" data-original-title='' data-toggle='tooltip' data-trigger='hover' data-placement='bottom' readonly onchange="caclje(this,6)" class="form-control tooltips" style="text-align:right;">　<b>元</b></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>第六节点描述</b></div></td><td width="640" colspan="3">
                <input name="jdms6" value="" class="form-control tooltips"></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>第七节点</b></div></td><td width="640" colspan="3"><b>100%</b></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>第七节点描述</b></div></td><td width="640" colspan="3">
                <input name="jdms7" value="" class="form-control tooltips"></td></tr>

            <tr valign="top"><td width="138"><div align="center"><b>附件</b></div></td><td width="640" colspan="3">
                <input id="id_fj2" class="btn btn-primary" type="file" name="%%File.482585e1000e41e2.ae8c805fd3ef2129482585cf0056c7ba.$Body.0.5F0C">
                <input type="button" onclick="if($('#id_fj2').val() == ''){
	alert('请选择需要上传的材料文件');
	return false;
}

if (document.getElementById('id_fj2').files[0].size/1024/1024 &gt; 200){
	alert('上传的附件请勿超过200MB');
	return false;
}


strFilename = $('#id_fj2').val().split('\\');
strFilename = strFilename[strFilename.length - 1];

var vAttexist = $('#id_attName').val().split('@#')
for(var i = 0; i &lt; vAttexist.length; i++){
	if (vAttexist[i] == strFilename){
		alert('附件：“' + strFilename + '”已存在，请重命名后再上传！');
		return false;
	}
}
//提交保存
$('#id_btn_save_fjtab').click();
" value="上传" class="btn btn-primary"> <br>
            </td></tr>
        </table>
    </div></div>
    </body>

    <script src="/dongyang/js/jquery-1.10.2.min.js"></script>
    <script src="/dongyang/js/jquery-ui-1.9.2.custom.min.js"></script>
    <script src="/dongyang/js/jquery-migrate-1.2.1.min.js"></script>
    <script src="/dongyang/js/bootstrap.min.js"></script>
    <script src="/dongyang/js/modernizr.min.js"></script>
    <script src="/dongyang/js/jquery.nicescroll.js"></script>
    <script src="/dongyang/AdminLTE/bower_components/ckeditor/ckeditor.js"></script>
    <!--common scripts for all pages-->
    <script src="/dongyang/js/scripts.js"></script>


</form>
</body>
</html>
